<div>
	<yu-panel title="警示对象管理">
		<yu-xform related-table-name="refTable" form-type="search" v-model="searchFormdata">
			<yu-xform-group :column="4">
				<yu-xform-item label="通知方式" placeholder="通知方式" ctype="select" name="alarmMode" data-code="USE_ALERTM_MODE"></yu-xform-item>
				<yu-xform-item label="对象编码" placeholder="对象编码" ctype="input" name="targetCode"></yu-xform-item>
				<yu-xform-item label="对象名称" placeholder="对象名称" ctype="input" name="targetName"></yu-xform-item>
			</yu-xform-group>
		</yu-xform>
		<yu-toolBar>
			<yu-button @click="addFn" v-if="addFnButton">新增</yu-button>
			<yu-button @click="modifyFn" v-if="updateFnButton">修改</yu-button>
			<yu-button @click="deleteFN" v-if="deleteFnButton">删除</yu-button>
		</yu-toolBar>
		<div ref="tableBox" style="overflow: auto;">
			<yu-xtable :height="tbHeight" ref="refTable" row-number :data-url="dataUrl" selection-type="radio">
				<yu-xtable-column label="对象编码"  :show-overflow-tooltip="true" prop="targetCode"></yu-xtable-column>
				<yu-xtable-column label="对象名称" :show-overflow-tooltip="true" prop="targetName">
					<template slot-scope="scope">
						<a class="diandian" style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="viewFn(scope.row)">{{ scope.row.targetName }}</a>
					</template>
				</yu-xtable-column>
				<yu-xtable-column :show-overflow-tooltip="true" label="通知方式" prop="alarmMode" data-code="USE_ALERTM_MODE"></yu-xtable-column>
				<yu-xtable-column :show-overflow-tooltip="true" label="通知地址" prop="targetData"></yu-xtable-column>
			</yu-xtable>
		</div>
	</yu-panel>
	<yu-dialog :title="viewTitle" :visible.sync="dialogVisible">
		<yu-xform ref="refForm" v-model="formdata" label-width="120px" >
			<yu-xform-group>
				<yu-xform-item label="对象编码"  :rules="rulesone" ctype="input" maxlength="64" name="targetCode" :colspan="12" :disabled="!addFlag"></yu-xform-item>
				<yu-xform-item label="对象名称" ctype="input" maxlength="120" name="targetName" :colspan="12" rules="required"></yu-xform-item>
				<yu-xform-item label="通知方式" ctype="select" data-code="USE_ALERTM_MODE" :disabled="!addFlag" :colspan="12" name="alarmMode"
				 rules="required"></yu-xform-item>
				<yu-xform-item label="通知地址" ctype="input" maxlength="64" name="targetData" :colspan="12" rules="required"></yu-xform-item>
				<yu-xform-item label="备注" ctype="textarea" maxlength="240" name="remark" :colspan="24" :rows="3"></yu-xform-item>
			</yu-xform-group>
		</yu-xform>
		<div class="yu-grpButton">
			<yu-button v-show="cancelBtnShow" @click="cancelFn">取消</yu-button>
			<yu-button type="primary" v-if="!saveDisabled" @click="saveFn" :disabled="saveDisabled">保存</yu-button>
			<yu-button type="info" v-if="saveDisabled" @click="saveFn" :disabled="saveDisabled">保存</yu-button>
		</div>
	</yu-dialog>

</div>
<style type="text/css">
	.diandian{
		overflow: hidden;
		word-break: break-all;
		box-sizing: border-box;
		text-overflow: ellipsis;
	}
</style>